/**
 * 
 */
package com.ideeli.webextractor.domain;

import java.util.Date;

/**
 * @author spaida
 *
 */
public class Product {
	
	private int product_id;
	private String model;
	private String sku;
	private String upc;
	private String location;
	private String vendor;
	
	private int quantity;
	private int stock_status_id;
	private String image;
	private int manufacturer_id;
	private short shipping;
	private float price;
	private int points;
	private int tax_class_id;
	private Date date_available;
	private float weight;
	private int weight_class_id;
	private float length;
	private float width;
	private float height;
	private int length_class_id;
	private short subtract;
	private int minimum;
	private int sort_order;
	private short status;
	private Date date_added;
	private Date date_modified;
	private int viewed;
	private int language_id;
	private String name;
	private String description;
	private String meta_description;
	private String meta_keyword;
	private String largeImage;
	
	private float base_price;
	private float profit_percent;
	private float tax;
	private float plusMinus;
	private float stnRetailPrice;

	private int supplierId;
	
	private boolean skipProduct=false;
	
	public boolean isSkipProduct() {
		return skipProduct;
	}
	public void setSkipProduct(boolean skipProduct) {
		this.skipProduct = skipProduct;
	}
	public int getSupplierId() {
		return supplierId;
	}
	public void setSupplierId(int supplierId) {
		this.supplierId = supplierId;
	}
	public int getProduct_id() {
		return product_id;
	}
	public void setProduct_id(int product_id) {
		this.product_id = product_id;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getSku() {
		return sku;
	}
	public void setSku(String sku) {
		this.sku = sku;
	}
	public String getUpc() {
		return upc;
	}
	public void setUpc(String upc) {
		this.upc = upc;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public int getQuantity() {
		return quantity;
	}
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	public int getStock_status_id() {
		return stock_status_id;
	}
	public void setStock_status_id(int stock_status_id) {
		this.stock_status_id = stock_status_id;
	}
	public String getImage() {
		return image;
	}
	public void setImage(String image) {
		this.image = image;
	}
	public int getManufacturer_id() {
		return manufacturer_id;
	}
	public void setManufacturer_id(int manufacturer_id) {
		this.manufacturer_id = manufacturer_id;
	}
	public short getShipping() {
		return shipping;
	}
	public void setShipping(short shipping) {
		this.shipping = shipping;
	}
	public float getPrice() {
		return price;
	}
	public void setPrice(float price) {

		this.price = price;
	}
	public int getPoints() {
		return points;
	}
	public void setPoints(int points) {
		this.points = points;
	}
	public int getTax_class_id() {
		return tax_class_id;
	}
	public void setTax_class_id(int tax_class_id) {
		this.tax_class_id = tax_class_id;
	}
	public Date getDate_available() {
		return date_available;
	}
	public void setDate_available(Date date_available) {
		this.date_available = date_available;
	}
	public float getWeight() {
		return weight;
	}
	public void setWeight(float weight) {
		this.weight = weight;
	}
	public int getWeight_class_id() {
		return weight_class_id;
	}
	public void setWeight_class_id(int weight_class_id) {
		this.weight_class_id = weight_class_id;
	}
	public float getLength() {
		return length;
	}
	public void setLength(float length) {
		this.length = length;
	}
	public float getWidth() {
		return width;
	}
	public void setWidth(float width) {
		this.width = width;
	}
	public float getHeight() {
		return height;
	}
	public void setHeight(float height) {
		this.height = height;
	}
	public int getLength_class_id() {
		return length_class_id;
	}
	public void setLength_class_id(int length_class_id) {
		this.length_class_id = length_class_id;
	}
	public short getSubtract() {
		return subtract;
	}
	public void setSubtract(short subtract) {
		this.subtract = subtract;
	}
	public int getMinimum() {
		return minimum;
	}
	public void setMinimum(int minimum) {
		this.minimum = minimum;
	}
	public int getSort_order() {
		return sort_order;
	}
	public void setSort_order(int sort_order) {
		this.sort_order = sort_order;
	}
	public short getStatus() {
		return status;
	}
	public void setStatus(short status) {
		this.status = status;
	}
	public Date getDate_added() {
		return date_added;
	}
	public void setDate_added(Date date_added) {
		this.date_added = date_added;
	}
	public Date getDate_modified() {
		return date_modified;
	}
	public void setDate_modified(Date date_modified) {
		this.date_modified = date_modified;
	}
	public int getViewed() {
		return viewed;
	}
	public void setViewed(int viewed) {
		this.viewed = viewed;
	}
	public int getLanguage_id() {
		return language_id;
	}
	public void setLanguage_id(int language_id) {
		this.language_id = language_id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getMeta_description() {
		return meta_description;
	}
	public void setMeta_description(String meta_description) {
		this.meta_description = meta_description;
	}
	public String getMeta_keyword() {
		return meta_keyword;
	}
	public void setMeta_keyword(String meta_keyword) {
		this.meta_keyword = meta_keyword;
	}
	public String getLargeImage()
	{
		return largeImage;
	}
	public void setLargeImage(String largeImage)
	{
		this.largeImage = largeImage;
	}

	public float getBase_price()
	{
		return base_price;
	}
	public void setBase_price(float base_price)
	{
		this.base_price = base_price;
	}
	public float getProfit_percent()
	{
		return profit_percent;
	}
	public void setProfit_percent(float profit_percent)
	{
		this.profit_percent = profit_percent;
	}
	public float getTax()
	{
		return tax;
	}
	public void setTax(float tax)
	{
		this.tax = tax;
	}
	public float getPlusMinus()
	{
		return plusMinus;
	}
	public void setPlusMinus(float plusMinus)
	{
		this.plusMinus = plusMinus;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + Float.floatToIntBits(base_price);
		result = prime * result
				+ ((date_added == null) ? 0 : date_added.hashCode());
		result = prime * result
				+ ((date_available == null) ? 0 : date_available.hashCode());
		result = prime * result
				+ ((date_modified == null) ? 0 : date_modified.hashCode());
		result = prime * result
				+ ((description == null) ? 0 : description.hashCode());
		result = prime * result + Float.floatToIntBits(height);
		result = prime * result + ((image == null) ? 0 : image.hashCode());
		result = prime * result + language_id;
		result = prime * result
				+ ((largeImage == null) ? 0 : largeImage.hashCode());
		result = prime * result + Float.floatToIntBits(length);
		result = prime * result + length_class_id;
		result = prime * result
				+ ((location == null) ? 0 : location.hashCode());
		result = prime * result + manufacturer_id;
		result = prime
				* result
				+ ((meta_description == null) ? 0 : meta_description.hashCode());
		result = prime * result
				+ ((meta_keyword == null) ? 0 : meta_keyword.hashCode());
		result = prime * result + minimum;
		result = prime * result + ((model == null) ? 0 : model.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + Float.floatToIntBits(plusMinus);
		result = prime * result + points;
		result = prime * result + Float.floatToIntBits(price);
		result = prime * result + product_id;
		result = prime * result + Float.floatToIntBits(profit_percent);
		result = prime * result + quantity;
		result = prime * result + shipping;
		result = prime * result + ((sku == null) ? 0 : sku.hashCode());
		result = prime * result + sort_order;
		result = prime * result + status;
		result = prime * result + stock_status_id;
		result = prime * result + subtract;
		result = prime * result + Float.floatToIntBits(tax);
		result = prime * result + tax_class_id;
		result = prime * result + ((upc == null) ? 0 : upc.hashCode());
		result = prime * result + viewed;
		result = prime * result + Float.floatToIntBits(weight);
		result = prime * result + weight_class_id;
		result = prime * result + Float.floatToIntBits(width);
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Product other = (Product) obj;
		if (Float.floatToIntBits(base_price) != Float
				.floatToIntBits(other.base_price))
			return false;
		if (date_added == null) {
			if (other.date_added != null)
				return false;
		} else if (!date_added.equals(other.date_added))
			return false;
		if (date_available == null) {
			if (other.date_available != null)
				return false;
		} else if (!date_available.equals(other.date_available))
			return false;
		if (date_modified == null) {
			if (other.date_modified != null)
				return false;
		} else if (!date_modified.equals(other.date_modified))
			return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (Float.floatToIntBits(height) != Float.floatToIntBits(other.height))
			return false;
		if (image == null) {
			if (other.image != null)
				return false;
		} else if (!image.equals(other.image))
			return false;
		if (language_id != other.language_id)
			return false;
		if (largeImage == null) {
			if (other.largeImage != null)
				return false;
		} else if (!largeImage.equals(other.largeImage))
			return false;
		if (Float.floatToIntBits(length) != Float.floatToIntBits(other.length))
			return false;
		if (length_class_id != other.length_class_id)
			return false;
		if (location == null) {
			if (other.location != null)
				return false;
		} else if (!location.equals(other.location))
			return false;
		if (manufacturer_id != other.manufacturer_id)
			return false;
		if (meta_description == null) {
			if (other.meta_description != null)
				return false;
		} else if (!meta_description.equals(other.meta_description))
			return false;
		if (meta_keyword == null) {
			if (other.meta_keyword != null)
				return false;
		} else if (!meta_keyword.equals(other.meta_keyword))
			return false;
		if (minimum != other.minimum)
			return false;
		if (model == null) {
			if (other.model != null)
				return false;
		} else if (!model.equals(other.model))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (Float.floatToIntBits(plusMinus) != Float
				.floatToIntBits(other.plusMinus))
			return false;
		if (points != other.points)
			return false;
		if (Float.floatToIntBits(price) != Float.floatToIntBits(other.price))
			return false;
		if (product_id != other.product_id)
			return false;
		if (Float.floatToIntBits(profit_percent) != Float
				.floatToIntBits(other.profit_percent))
			return false;
		if (quantity != other.quantity)
			return false;
		if (shipping != other.shipping)
			return false;
		if (sku == null) {
			if (other.sku != null)
				return false;
		} else if (!sku.equals(other.sku))
			return false;
		if (sort_order != other.sort_order)
			return false;
		if (status != other.status)
			return false;
		if (stock_status_id != other.stock_status_id)
			return false;
		if (subtract != other.subtract)
			return false;
		if (Float.floatToIntBits(tax) != Float.floatToIntBits(other.tax))
			return false;
		if (tax_class_id != other.tax_class_id)
			return false;
		if (upc == null) {
			if (other.upc != null)
				return false;
		} else if (!upc.equals(other.upc))
			return false;
		if (viewed != other.viewed)
			return false;
		if (Float.floatToIntBits(weight) != Float.floatToIntBits(other.weight))
			return false;
		if (weight_class_id != other.weight_class_id)
			return false;
		if (Float.floatToIntBits(width) != Float.floatToIntBits(other.width))
			return false;
		return true;
	}
	
	public String toString()
	{
		return product_id+","+sku;
	}
	public String getVendor()
	{
		return vendor;
	}
	public void setVendor(String vendor)
	{
		this.vendor = vendor;
	}

	public float getStnRetailPrice()
	{
		return stnRetailPrice;
	}
	public void setStnRetailPrice(float stnRetailPrice)
	{
		this.stnRetailPrice = stnRetailPrice;
	}

	
}
